package com.example.h2o.sqlitedemo3.sql;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class MyHelper extends SQLiteOpenHelper {
    public MyHelper(Context context){
        super(context,"computer.db",null,1);
    }
    //执行一次
    @Override
    public void onCreate(SQLiteDatabase sqLiteDatabase) {
        sqLiteDatabase.execSQL("create table teacher (id inteheger primary key autoincrement ," +
                "name varchar(20) ,"+"sex varchar(5))");
    }
    //版本号升级的时候执行
    @Override
    public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {

    }
}
